package org.dromara.xyyw.domain.bo;

import org.dromara.xyyw.domain.XyywShoppingCart;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.io.Serial;
import java.io.Serializable;

/**
 * 购物车业务对象 xyyw_shopping_cart
 *
 * @author yf
 * @date 2024-05-29
 */
@Data
@AutoMapper(target = XyywShoppingCart.class, reverseConvertGenerate = false)
public class XyywShoppingCartBo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 购物车ID
     */
    @NotNull(message = "购物车ID不能为空", groups = {EditGroup.class})
    private Integer shoppingCartId;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer userId;

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer productId;

    /**
     * 数量
     */
    private Integer quantity;

    /**
     * 小计金额
     */
    private BigDecimal subtotal;

    /**
     * 加入购物车时间
     */
    private Date addToCartTime;

    /**
     * 购物车项状态(正常、已结算、已删除)
     */
    private String cartItemStatus;

}
